package com.wits.platform.dao.impl;

import org.springframework.stereotype.Component;

import com.wits.platform.dao.custom.MmrRoleMenuDaoCustom;
import com.wits.platform.entity.MmrRoleMenu;
import com.wits.platform.entity.MmrRoleMenuPK;
@Component
public class MmrRoleMenuDaoImpl extends BaseDaoImpl<MmrRoleMenu,MmrRoleMenuPK> implements MmrRoleMenuDaoCustom{

	@Override
	public int findRowCountByMuIds(String muIds) {
		Number num=this.uniqueByNative(String.format("select count(mu_id) from wits_mmr_role_menu where mu_id in(%s)", muIds));
		return num.intValue();
	}

	@Override
	public void deleteByRoleId(String roleId) {
		this.executeUpdateByNative("delete from wits_mmr_role_menu where role_id=?",roleId);
	}

}
